﻿using SS.WPF.Toolkit.PropertyEditor;

namespace TestFramework.Config
{
    public class DemoCustomTypeDescriptor : CustomTypeDescriptorBase<PropertySource>
    {
        public DemoCustomTypeDescriptor(PropertySource equipmentGeneralSetting)
            : base(equipmentGeneralSetting)
        {
        }

        [DynamicProperty]
        public OperationModeEnum OperationMode
        {
            get
            {
                return this.Data.OperationMode;
            }
            set
            {
                this.Data.OperationMode = value;
                this.NotifyOfPropertyChange(() => this.OperationMode);
            }
        }

        [DynamicProperty(ValidationGroup = "SV")]
        public int SVTriggerTimer
        {
            get
            {
                return this.Data.SVTriggerTimer;
            }
            set
            {
                this.Data.SVTriggerTimer = value;
                this.NotifyOfPropertyChange(() => this.SVTriggerTimer);
            }
        }

        [DynamicProperty]
        public int OBSTriggerTimer
        {
            get
            {
                return this.Data.OBSTriggerTimer;
            }
            set
            {
                this.Data.OBSTriggerTimer = value;
                this.NotifyOfPropertyChange(() => this.OBSTriggerTimer);
            }
        }

        [DynamicProperty]
        public int HSMSCheckTimer
        {
            get
            {
                return this.Data.HSMSCheckTimer;
            }
            set
            {
                this.Data.HSMSCheckTimer = value;
                this.NotifyOfPropertyChange(() => this.HSMSCheckTimer);
            }
        }

        [DynamicProperty]
        public bool TransformationSupport
        {
            get
            {
                return this.Data.TransformationSupport;
            }
            set
            {
                this.Data.TransformationSupport = value;
                this.NotifyOfPropertyChange(() => this.TransformationSupport);
            }
        }

        [DynamicProperty]
        public string DateTimeFormat
        {
            get
            {
                return this.Data.DateTimeFormat;
            }
            set
            {
                this.Data.DateTimeFormat = value;
                this.NotifyOfPropertyChange(() => this.DateTimeFormat);
            }
        }

        [DynamicProperty]
        public string EAOperationMode
        {
            get
            {
                return this.Data.EAOperationMode;
            }
            set
            {
                this.Data.EAOperationMode = value;
                this.NotifyOfPropertyChange(() => this.EAOperationMode);
            }
        }

        [DynamicProperty]
        public string SessionPingInterval
        {
            get
            {
                return this.Data.SessionPingInterval;
            }
            set
            {
                this.Data.SessionPingInterval = value;
                this.NotifyOfPropertyChange(() => this.SessionPingInterval);
            }
        }
    }
}
